package com.hjs.bean;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.ArrayList;

/**
 * @author violetfreesia
 * @date 2020/07/02
 */
@Getter
@Setter
@ToString
public class UsersInfo {
    private String userId;
    private Integer departmentId;
    private String userName;
    private ArrayList<String> roles = new ArrayList<>();
    private Integer superDepartmentId;

    public UsersInfo(UserView user) {
        userId = user.getUserID();
        departmentId = user.getDepartmentID();
        userName = user.getUserName();
        roles.add(String.valueOf(user.getRightGradeID()));
        superDepartmentId=user.getSuperDepartmentID();
    }
}
